package com.scorpio.baselibrary.utils.glide;

import android.content.Context;
import android.content.pm.PackageInfo;
import androidx.annotation.NonNull;

import com.bumptech.glide.Glide;
import com.bumptech.glide.Registry;
import com.bumptech.glide.annotation.GlideModule;
import com.bumptech.glide.module.AppGlideModule;

import java.io.InputStream;

/**
 * created by zhud on 2019/9/29
 */
@GlideModule
public class ApkGlideModule extends AppGlideModule {
    @Override
    public void registerComponents(@NonNull Context context, @NonNull Glide glide, @NonNull Registry registry) {
        registry.prepend(PackageInfo.class, InputStream.class, new ApkModelLoaderFactory(context));
    }
}